package game.controller.globalVar
{
	import game.constants.globalVar.notif.GlobalVarNotification;
	import game.model.globalVar.GlobalVarProxy;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	/**
	 * ...
	 * @author Thot
	 */
	
	public class SetGlobalVarCommand extends SimpleCommand
	{
		override public function execute( notification:INotification ):void
		{
			var proxy:GlobalVarProxy = facade.retrieveProxy(GlobalVarProxy.NAME) as GlobalVarProxy;
			var body:GlobalVarNotification = notification.getBody() as GlobalVarNotification;
			proxy.setGlobalVar( body.varName, body.value );
		}
	}
	
}